package com.fresh.utils;

import java.util.List;

public class PageModel<T> {

	private int currentPage;//当前页
	private int size;//每一页显示条数
	private int sumCount;//总条数
	private int sumPage;//总页数————注意：由总条数和每一页显示条数决定
	private List<T> list;

	public int getCurrentPage() {
		return currentPage;
	}
	public void setCurrentPage(int currentPage) {
		this.currentPage = currentPage;
	}
	public int getSumCount() {
		return sumCount;
	}
	public void setSumCount(int sumCount) {
		this.sumCount = sumCount;
	}
	public int getSize() {
		return size;
	}
	public void setSize(int size) {
		this.size = size;
	}
	public int getSumPage() {
		return sumPage;
	}
	public void setSumPage(int sumPage) {
		//pm.setSumPage(count%size==0 ? count/size : count/size+1);
		if(sumPage%getSize()==0){
			sumPage=sumPage/getSize();
		}else{
			sumPage=sumPage/getSize()+1;
		}
		
		this.sumPage = sumPage;
	}
	public List<T> getList() {
		return list;
	}
	public void setList(List<T> list) {
		this.list = list;
	}
	
	
	
}
